
/*
全局临时变量
 */

//临时数据
abstract class XTempData{

  //半屏是否已经有过显示蒙层,后续半屏则透明(避免颜色加深)
  static bool isPageMengcengLeftOpen=false;
  static bool isPageMengcengRightOpen=false;
  static String mengcengLeftOpenPageName="";//打开半透明蒙层的activity
  static String mengcengRightOpenPageName="";//打开半透明蒙层的activity

  //屏幕尺寸:在XPageWelcomeState的onBuildWidget中获得,注意:不能在pagestate的initState()或onCreate()中调用,否则报错;
  static double screenWidth=1280;
  static double screenHeight=720;
  static double statusBarHeight=20; //状态栏高度

  //各平台通用路径 Android	iOS	Linux	macOS	Windows (除web外)
  static String appDocumentsDirectoryPath='';


  //默认字体大小
  static double defaultTextFontSize=14;//内容
  static double defaultSmallTextFontSize=12;//内容
  static double defaultMiniTextFontSize=10;//内容

  static double defaultTitleFontSize=16;//标题
  static double defaultButtonFontSize=16;//按钮


  //分割线
  static double defaultDividerHeight=0.5;
  //默认bar高度
  static double defaultBarHeight=48;

  //Switch
  static double defaultSwitchWidth=60;
  static double defaultSwitchHeight=36;
  static double defaultCheckboxWidth=30;
  static double defaultCheckboxHeight=30;
  static double defaultRadioWidth=30;
  static double defaultRadioHeight=30;
  //默认底部栏高度
  static double defaultBottomHeight=36;
  static double defaultBottomRadius=18;
  static double? defaultBottomBarHeight;
  //左右结构中,左侧默认宽度
  static double defaultLeftKeyWidth=90;

  static double defaultPageMarginLeft=10;
  static double defaultPageMarginRight=10;
  static double defaultLeftRightWidgetMarginLeft=10;
  static double defaultLeftRightWidgetMarginRight=10;
  static double defaultLoadingWidgetWidthHeight=20;
  static double defaultLoadingWidgetStrokeWidth=2;

  /*
  SfDataGrid 实测iOS会多次触发底部加载更多loadMoreViewBuilder,因此用于拦截过滤重复触发,等请求数据返回后再解锁
   */
  static bool isSfDataTableLoadingMoreRows=false;
  static bool isSfDataTableNoMoreRows=false;
  //从界面底部弹出如输入框,是否重新改变UI布局高度
  static bool isResizeToAvoidBottomInset=true;

  //设备信息
  static Map<String,dynamic>? deviceInfo;

  //本地wifi ip
  static String? localWifiIP;
}

//常量
abstract class XConstants {
  //用户组(用于多用户保存数据,可以是companyId或userId等)
  static const String SP_UserGroup = 'SP_UserGroup';

  //已连接蓝牙设备
  static const String SP_BluetoothBleDevicesList = 'SP_BluetoothBleDevicesList';
  //已连接Socket设备
  static const String SP_SocketDevicesList = 'SP_SocketDevicesList';
  //已连接远程设备
  static const String SP_RemoteDevicesList = 'SP_RemoteDevicesList';
  //已连接Usb设备
  static const String SP_UsbDevicesList = 'SP_UsbDevicesList';
  //已连接UsbSerial设备
  static const String SP_UsbSerialDevicesList = 'SP_UsbSerialDevicesList';

  //消息队列
  static const String SP_XQueue_Msg="SP_XQueue_Msg";

  //charles,fildder抓包工具的代理
  static const String SP_proxy_ip_port="SP_proxy_ip_port";


  static const String XCustomSocketHeartbeatData="XCustomSocketHeartbeatData";
  static const String XCustomSocketReceiveDataSucceed="XCustomSocketReceiveDataSucceed";
  static const String XCustomSocketData="XCustomSocketData";



}

